package main

import (
	"agent.com/iagentgo/inbox"
	"agent.com/iagentgo/infra"
	"agent.com/iagentgo/model"
	"github.com/cloudwego/hertz/pkg/app/server"
	"github.com/cloudwego/hertz/pkg/network/standard"
)

func main() {

	infra.LoadAll()
	// 初始化模型
	model.NewModelBridge()

	h := server.Default(
		server.WithHostPorts(":8080"),
		server.WithMaxRequestBodySize(20<<20),
		server.WithTransport(standard.NewTransporter),
	)

	// 注册路由
	inbox.AddHertzRoute(h)

	// 启动服务
	h.Spin()

}
